export default function parseAttrsString(str) {
    if (!str || str.length == 0) {
        return
    }
    var isYinhao = false
    var point = 0
    let result = []
    for (let i = 0; i < str.length; i++) {
        const element = str[i];
        if (element == '"') {
            isYinhao = !isYinhao
        } else if (element == ' ' && !isYinhao) {
            console.log(i)
            if (!/^\s*?$/.test(str.substring(point, i))) {
                result.push(str.substring(point, i).trim())
                point = i
            }
        }
    }
    result.push(str.substring(point).trim())
    result = result.map(item => {
        const o = item.match(/^(.+)="(.+)"$/)
        return {
            name: o[1],
            value: o[2]
        }
    })
    console.log(result)
    return result
}